package com.travel.controller;

import com.qianfeng.util.ResultMsg;
import com.travel.entity.TbTripOrder;
import com.travel.service.TripOrderService;
import com.travel.service.TripService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admintrip")
public class AdminTripController {

    @Autowired
    TripService tripService;

    @PostMapping("/triporder")
    public ResultMsg tripone(@RequestBody TbTripOrder triporderlists){
        ResultMsg resultMsg = tripService.insertOne(triporderlists);
        return resultMsg;
    }

    @GetMapping("/selectone")
    public ResultMsg selectOne(String userCarid){
        return tripService.findOne(userCarid);
    }

}